home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
Dots & Pixels
/
headers
/
stereopair.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-29
|
1KB
|
55 lines
#pragma once
class stereopair
{
public:
stereopair( int breedte = 256, int hoogte = 256,
int backDisparity = 8, CTabHandle cTable = nil);
~stereopair();
void CleanSheet() const;
void AddRect( short x, short y, short width, short height,
int leftDisparity = -4, int rightDisparity = 4) const;
const gworld *GetImage() const;
const gworld *GetLeftImage() const;
const gworld *GetRightImage() const;
private:
int my_leftDisparity;
int my_rightDisparity; // always negative
//
// we maintain the following gworld instances:
//
// L : the current left-eye image
// R : the current right-eye image
// left_noise : noise to blit at the left side of the left eye image
// (at the right side if my_leftDisparity < 0)
// right_noise : noise to blit at the right side of the right eye image
// (at the left side if my_rightDisparity > 0)
// LR : the combined Left and Right eye images
//
Rect leftNoiseRect; // rects used in blitting left_noise to L
Rect leftNoiseImageRect;
Rect rightNoiseRect; // rects used in blitting right_noise to R
Rect rightNoiseImageRect;
gworld *L;
gworld *R;
gworld *left_noise;
gworld *right_noise;
gworld *LR;
};
inline const gworld *stereopair::GetLeftImage() const
{
return L;
}
inline const gworld *stereopair::GetRightImage() const
{
return R;
}